
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>设置分享</title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <link href="/public/static/home/themes/css/login.css" rel="stylesheet">
    <link rel="shortcut icon" href="/public/static/admin/uploads/set/{$setting['ico']}">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/base.css">
    <link type="text/css" rel="stylesheet" href="/public/static/home/themes/css/home.css">
    <script type="text/javascript" src="/public/static/home/themes/js/jquery.min.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/slider.js"></script>
    <script type="text/javascript" src="/public/static/home/themes/js/tab.js"></script>
    <style>
        *{font-size:14px;}
    </style>
</head>

<body>
<section class="aui-flexView">
    <header class="aui-navBar aui-navBar-fixed b-line">
        <a href="javascript:history.back(-1)" class="aui-navBar-item">
            <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
            <span class="aui-center-title">设置分享</span>
        </div>
    </header>
    <section class="aui-scrollView">
            <form name="forms" method="post" class="login-cont" id="form1">
                <ul>
                    <li  style=" padding:0px;height: auto">
                        <span id="box">
                            <input type="text"  name="adv_href" placeholder="分享地址" id="adv_href" value="{$user.adv_href}"/>
                        </span>
                    </li>
                    <li  style=" padding:0px;height: auto">
                        <span id="box">
                            <textarea type="text"  name="adv_str" placeholder="分享文案" id="adv_str"  style="width: 100%;border:0px;line-height: 25px;">{$user.adv_str}</textarea>
                        </span>
                    </li>
                </ul>
                <a href="javascript:;"  class="button text-center block" id="login">保存</a>
            </form>
    </section>
{include file="public/footer3"}
</section>
<script src="/public/static/admin/layui/layui.js"></script>
<script type="text/javascript">
    layui.use('upload', function() { //独立版的layer无需执行这一句
        var $ = layui.jquery, layer = layui.layer,upload = layui.upload; //独立版的layer无需执行这一句
        //登录
        $("#login").click(function () {
            var form = $("#form1").serializeArray()
            var data = {}
            form.forEach(function(item){
                data[item.name] = item.value
            })

            $.post("{:url('Set/update')}",data,function(data){
                layer.msg(data.msg,{time:2000,shade:0.5},function(){
                    if(data.url){
                        window.location.href = data.url;
                    }
                });
            });

        });

    });


</script>

</body>
</html>
